import Vue from 'vue'
import VueRouter from 'vue-router'
import VueValidator from 'vue-validator'
import {sync} from 'vuex-router-sync'
import App from './components/App.vue'
import store from './vuex/store'
import routes from './routes'
import filters from './utils/filters'
//**import css start**/

import 'font-awesome/css/font-awesome.css'
import 'bootstrap/dist/css/bootstrap.css'
import 'jackblog-sass/dist/index.css'
import 'vue-toast/dist/vue-toast.min.css'
//**import css end**/
Vue.use(VueRouter);

Vue.use(VueValidator);
Object.keys(filters).forEach(k => Vue.filter(k, filters[k]))
var router = new VueRouter({
    history: true,
    saveScrollPosition: true,
    suppressTransitionError: true
});

routes(router);
sync(store,router)

router.start(App,'body');

window.router = router
